/*
 * This file is part of Catfish.
 * Copyright (C) 2010 Namazu Studios LLC
 * 
 * Catfish is free software: you can redistribute it and/or modify
 * it under the terms of the GNU Lesser General Public License as 
 * published by the Free Software Foundation, either version 3 of 
 * the License, or (at your option) any later version.
 * 
 * Catfish is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU Lesser General Public License for more details.
 * 
 * You should have received a copy of the GNU Lesser General Public
 * License along with Catfish.  If not, please visit:
 *  
 * http://www.gnu.org/licenses/
 *  
 */
package com.namazustudios.catfish.annotation;

import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

/**
 * Indicates that the field is to be "flatly" stored in the entity. Its fields
 * are stored in the same entity as its enclosing entity. The values in this
 * should not clash with the enclosing type. For instance...
 * 
 * <code>
 * 
 * @Entity
 * class Foo {
 * 
 *     @Property
 *     String name;
 * 
 *     @Flat
 *     Bar b = new Bar();
 *     
 * }
 * 
 * 
 * class Bar {
 * 
 *     @Property
 *     String name; 
 * }
 * </code>
 * 
 * will result in a clash. The actual value put into the datastore will be 
 * undefined.
 * 
 * This does not support Collection types as doing so would not make much sense
 * and lead to awkwardness. 
 * 
 * @author patricktwohig
 * 
 */
@Target(ElementType.FIELD)
@Retention(RetentionPolicy.RUNTIME)
public @interface Flat {}
